package dataStructure.xmg1.a12;

import dataStructure.xmg1.a12.map.Map;
import dataStructure.xmg1.a12.map.TreeMap;

/**
 * @author: vince_zww
 * @date: 2021/3/7 16:31
 * @desceription:
 */
public class Main {

    static void test1() {
        Map<String,Integer> map = new TreeMap<>();
        map.put("c",2);
        map.put("a",5);
        map.put("b",6);
        map.put("a", 8);

        map.traversal(new Map.Visitor<String, Integer>() {
            @Override
            public boolean visit(String key, Integer value) {
                System.out.println(key+"_"+value);
                return false;
            }
        });
    }


    public static void main(String[] args) {
        test1();
    }


}
